package org.freedoit.server.om;

// Generated Oct 11, 2012 3:54:05 PM by Hibernate Tools 3.4.0.CR1

import java.sql.Time;
import java.sql.Date;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity
@Table(name = "task")
public class Task implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9133219111512015514L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "task_id", unique = true, nullable = false)
	private Long taskId;

	@Column(name = "user_id")
	private Long userId;

	@Column(name = "task_type_id")
	private Long taskTypeId;

	@Column(name = "project_id")
	private Long projectId;

	@Column(name = "task_name", nullable = false)
	private String taskName;

	@Column(name = "description")
	private String description;

	@Column(name = "start_date")
	private Date startDate;

	@Column(name = "due_date")
	private Date dueDate;

	@Column(name = "finish_date")
	private Date finishDate;

	@Column(name = "start_time")
	private Time startTime;

	@Column(name = "due_time")
	private Time dueTime;

	@Column(name = "finish_time")
	private Time finishTime;

	@Column(name = "finished", nullable = false)
	private Boolean finished;

	@Column(name = "task_tag")
	private String taskTag;

	@Column(name = "status", nullable = false)
	private Integer status;

	@Column(name = "last_modify_time", nullable = false, length = 19)
	private Timestamp lastModifyTime;

    @Version
	@Column(name = "last_modify_by_client_id", nullable = false)
	private Long lastModifyByClientId;

	public Task() {
	}

	public Task(String taskName, Boolean finished, Integer status,
			Timestamp lastModifyTime, Long lastModifyByClientId) {
		this.taskName = taskName;
		this.finished = finished;
		this.status = status;
		this.lastModifyTime = lastModifyTime;
		this.lastModifyByClientId = lastModifyByClientId;
	}

	public Task(Long userId, Long taskTypeId, Long projectId, String taskName,
			String description, Date startDate, Date dueDate, Time startTime,
			Time dueTime, Boolean finished, String taskTag, Integer status,
			Timestamp lastModifyTime, Long lastModifyByClientId) {
		this.userId = userId;
		this.taskTypeId = taskTypeId;
		this.projectId = projectId;
		this.taskName = taskName;
		this.description = description;
		this.startDate = startDate;
		this.dueDate = dueDate;
		this.startTime = startTime;
		this.dueTime = dueTime;
		this.finished = finished;
		this.taskTag = taskTag;
		this.status = status;
		this.lastModifyTime = lastModifyTime;
		this.lastModifyByClientId = lastModifyByClientId;
	}

	public Long getTaskId() {
		return this.taskId;
	}

	public void setTaskId(Long taskId) {
		this.taskId = taskId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getTaskTypeId() {
		return this.taskTypeId;
	}

	public void setTaskTypeId(Long taskTypeId) {
		this.taskTypeId = taskTypeId;
	}

	public Long getProjectId() {
		return this.projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public String getTaskName() {
		return this.taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getDueDate() {
		return this.dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public Date getFinishDate() {
		return this.finishDate;
	}

	public void setFinishTime(Date finishDate) {
		this.finishDate = finishDate;
	}

	public Time getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Time startTime) {
		this.startTime = startTime;
	}

	public Time getDueTime() {
		return this.dueTime;
	}

	public void setDueTime(Time dueTime) {
		this.dueTime = dueTime;
	}

	public Time getFinishTime() {
		return this.finishTime;
	}

	public void setFinishTime(Time finishTime) {
		this.finishTime = finishTime;
	}

	public Boolean getFinished() {
		return this.finished;
	}

	public void setFinished(Boolean finished) {
		this.finished = finished;
	}

	public String getTaskTag() {
		return this.taskTag;
	}

	public void setTaskTag(String taskTag) {
		this.taskTag = taskTag;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Timestamp getLastModifyTime() {
		return this.lastModifyTime;
	}

	public void setLastModifyTime(Timestamp lastModifyTime) {
		this.lastModifyTime = lastModifyTime;
	}

	public Long getLastModifyByClientId() {
		return this.lastModifyByClientId;
	}

	public void setLastModifyByClientId(Long lastModifyByClientId) {
		this.lastModifyByClientId = lastModifyByClientId;
	}

}
